

********* This program defines survey variables and saves a new survey dataset for analysis *********

clear all
set more off, permanently
cd "$localdir\Data"
global output "$localdir\Output"



*** Survey 2010

use survey2010, clear

// US label on relevant variables

foreach var of varlist q19n1 q39 q40 q41 q42 q43 q44 q45 q46 {
gen `var'_us = `var'
}
lab var q19n1_us "Prob of becoming unemployed next year in pct"

lab var q39_us "Policy initiatives to help conseq of econ crisis"
lab def pol 1 "Too much" 2 "Enough" 3 "Not enough" 4 "Don't know"
lab val q39_us pol

lab var q40_us "Preferred policy to help conseq of econ crisis"
lab def pol2 1 "Tax cut" 2 "Public investments" 3 "Support firms" 4 "VAT cut temporarily" 5 "UI benefit increase temporarily" 6 "None of these" 7 "Don't know"
lab val q40_us pol2

lab var q41_us "Should government do more to support the unemployed"
lab def uiben 1 "More than now" 2 "Less than now" 3 "Keep current level of support" 4 "Don't know"
lab val q41_us uiben

lab var q42_us "Level of 'start help' transfer for immigrants"
lab def start 1 "Closer to UI benefits" 2 "Should be further decreased" 3 "Should be lower than UI benefits" 4 "Don't know"
lab val q42_us start

lab var q43_us "Who did you vote for at the most recent election"
lab def vote 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Did not vote" 10 "Others" 11 "Don't want to answer" 12 "Don't remember"
lab val q43_us vote

lab var q44_us "Who would you vote for if there was an election tomorrow"
lab def vote2 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Would not vote" 10 "Others" 11 "Don't want to answer" 12 "Don't know"
lab val q44_us vote2

lab var q45_us "How much should government do to increase living standards for the poor"
lab def redist 1 "1. Everything they can" 2 "2" 3 "3" 4 "4" 5 "5. People should take care of themselves"
lab val q45_us redist

lab var q46_us "What is most important for success"
lab def luck 1 "Hard work" 2 "Luck and help" 3 "Equally important" 4 "Don't know" 
lab val q46_us luck


* Keep completed interviews
count if Interview_status==7
keep if Interview_status==7

* Keep US-labeled variables
keep pnr *_us

save survey2010_us, replace






*** Survey 2011

use survey2011, clear

// US label on relevant variables

foreach var of varlist q11n1 q35 q36n1 q40n1 q41 q42 q43 q44 q45 q46 q47 q48 q49 {
gen `var'_us = `var'
}
lab var q11n1_us "Prob of becoming unemployed next year in pct"

lab var q35_us "Policy initiatives to help conseq of econ crisis"
lab def pol 1 "Too much" 2 "Enough" 3 "Not enough" 4 "Don't know"
lab val q35_us pol

lab var q36n1_us "Est. of national unemployment rate"

lab var q40n1_us "Est. of national unemployment rate next year"

lab var q41_us "Should government do more to support the unemployed"
lab def uiben 1 "More than now" 2 "Less than now" 3 "Keep current level of support" 4 "Don't know"
lab val q41_us uiben

lab var q42_us "Who is primarily responsible for conseq of the econ crisis in Denmark"
lab def crisis 1 "International financial markets" 2 "Danish government" 3 "Both" 4 "None of them" 5 "Don't know"
lab val q42_us crisis

lab var q43_us "Level of 'start help' transfer for immigrants"
lab def start 1 "Closer to UI benefits" 2 "Should be further decreased" 3 "Should be lower than UI benefits" 4 "Don't know"
lab val q43_us start

lab var q44_us "What share of low income people has diff ethnic background than Danish"
lab def im 1 "Less than 5 %" 2 "5-10 %" 3 "10-25 %" 4 "25-50 %" 5 "More than 50 %" 6 "Don't know/will not answer"
lab val q44_us im

lab var q45_us "What share of low skilled jobs carried out by people with diff ethnic background than Danish"
lab def im2 1 "Less than 5 %" 2 "5-10 %" 3 "10-25 %" 4 "25-50 %" 5 "More than 50 %" 6 "Don't know/will not answer"
lab val q45_us im2

lab var q46_us "Who did you vote for at the most recent election"
lab def vote 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Did not vote" 10 "Others" 11 "Don't want to answer" 12 "Don't remember"
lab val q46_us vote

lab var q47_us "Who would you vote for if there was an election tomorrow"
lab def vote2 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Would not vote" 10 "Others" 11 "Don't want to answer" 12 "Don't know"
lab val q47_us vote2

lab var q48_us "How much should government do to increase living standards for the poor"
lab def redist 1 "1. Everything they can" 2 "2" 3 "3" 4 "4" 5 "5. People should take care of themselves"
lab val q48_us redist

lab var q49_us "What is most important for success"
lab def luck 1 "Hard work" 2 "Luck and help" 3 "Equally important" 4 "Don't know" 
lab val q49_us luck

*** Keep completed interviews
count if Interview_status==1
keep if Interview_status==1

* Keep US-labeled variables
keep pnr *_us

save survey2011_us, replace






*** Survey 2012

use survey2012, clear

// US label on relevant variables

foreach var of varlist q15n1 q32 q33n1 q36n1 q37n1 q39 q41 q42 q43 q44 q45 q46 q47 {
gen `var'_us = `var'
}
lab var q15n1_us "Prob of becoming unemployed next year in pct"

lab var q32_us "Policy initiatives to help conseq of econ crisis"
lab def pol 1 "Too much" 2 "Enough" 3 "Not enough" 4 "Don't know"
lab val q32_us pol

lab var q33n1_us "Est. of national unemployment rate"

lab var q36n1_us "What share of the population are immigrants or descendants of immigrants"

lab var q37n1_us "What share of the population in your municipality are im or descendants of im"

lab var q39_us "Should government do more to support the unemployed"
lab def uiben 1 "More than now" 2 "Less than now" 3 "Keep current level of support" 4 "Don't know"
lab val q39_us uiben

lab var q41_us "Who is primarily responsible for conseq of the econ crisis in Denmark"
lab def crisis 1 "International financial markets" 2 "Danish government" 3 "Both" 4 "None of them" 5 "Don't know"
lab val q41_us crisis

/* The question on 'start help' changes between 2011 and 2012 as this special transfer was abolished*/   
replace q42_us = 1 if q42==2 // Start helt should be the same as standard UI benefits
replace q42_us = 2 if q42==3 // Start help and UI benefits should both be lowered 
replace q42_us = 3 if q42==1 // Start help should be lower than standard UI benefits
replace q42_us = 4 if q42==4 // Start help should be lower

lab var q42_us "Level of 'start help' transfer for immigrants"
lab def start 1 "Closer to UI benefits" 2 "Should be further decreased" 3 "Should be lower than UI benefits" 4 "Don't know"
lab val q42_us start

lab var q43_us "The new government has removed the cap on UI benefits 'kontanthjaelpsloftet' for married couples"
lab def uicap 1 "Good idea to remove it" 2 "Good idea to keep it" 3 "Don't know"
lab val q43_us uicap

lab var q44_us "Who did you vote for at the most recent election"
lab def vote3 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Blank vote" 10 "Did not vote" 11 "Others" 12 "Don't want to answer" 13 "Don't remember"
lab val q44_us vote3

lab var q45_us "Who would you vote for if there was an election tomorrow"
lab def vote4 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Blank vote" 10 "Would not vote" 11 "Others" 12 "Don't want to answer" 13 "Don't know"
lab val q45_us vote4

lab var q46_us "How much should government do to increase living standards for the poor"
lab def redist 1 "1. Everything they can" 2 "2" 3 "3" 4 "4" 5 "5. People should take care of themselves"
lab val q46_us redist

lab var q47_us "What is most important for success"
lab def luck 1 "Hard work" 2 "Luck and help" 3 "Equally important" 4 "Don't know" 
lab val q47_us luck


* Keep completed interviews
egen status=group(interview_Status)
count if status==6
keep if status==6
drop status

* Keep US-labeled variables
keep pnr *_us

save survey2012_us, replace





*** Survey 2013

use survey2013, clear

// US label on relevant variables

foreach var of varlist q13n1 q30n1 q39n1 q40 q49 q55 q56 q57 q58 {
gen `var'_us = `var'
}
lab var q13n1_us "Prob of becoming unemployed next year in pct"

lab var q30n1_us "Est. of national unemployment rate"

lab var q39n1_us "Est. of national unemployment rate next year"

lab var q40_us "Should government do more to support the unemployed"
lab def uiben 1 "More than now" 2 "Less than now" 3 "Keep current level of support" 4 "Don't know"
lab val q40_us uiben

replace q49_us = 1 if q49==2 // Start helt should be the same as standard UI benefits
replace q49_us = 2 if q49==3 // Start help and UI benefits should both be lowered 
replace q49_us = 3 if q49==1 // Start help should be lower than standard UI benefits
replace q49_us = 4 if q49==4 // Start help should be lower

lab var q49_us "Level of 'start help' transfer for immigrants"
lab def start 1 "Closer to UI benefits" 2 "Should be further decreased" 3 "Should be lower than UI benefits" 4 "Don't know"
lab val q49_us start

lab var q55_us "Who did you vote for at the most recent election"
lab def vote3 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Blank vote" 10 "Did not vote" 11 "Others" 12 "Don't want to answer" 13 "Don't remember"
lab val q55_us vote3

lab var q56_us "Who would you vote for if there was an election tomorrow"
lab def vote4 1 "The Social Democrats" 2 "The Social Liberals" 3 "The Conservatives" 4 "The Socialist Party" 5 "The Danish People's Party" 6 "The Liberal Party" ///
7 "The Liberal Alliance" 8 "The Red-Green Alliance" 9 "Blank vote" 10 "Would not vote" 11 "Others" 12 "Don't want to answer" 13 "Don't know"
lab val q56_us vote4

lab var q57_us "How much should government do to increase living standards for the poor"
lab def redist 1 "1. Everything they can" 2 "2" 3 "3" 4 "4" 5 "5. People should take care of themselves"
lab val q57_us redist

lab var q58_us "What is most important for success"
lab def luck 1 "Hard work" 2 "Luck and help" 3 "Equally important" 4 "Don't know" 
lab val q58_us luck

* Keep completed interviews
count if date!=""
keep if date!=""

* Keep US-labeled variables
keep pnr *_us

save survey2013_us, replace



